3.12 \(\int (d+e x)^2 (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=70 \[ \frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-\frac{b d^3 n \log (x)}{3 e}-b d^2 n x-\frac{1}{2} b d e n x^2-\frac{1}{9} b e^2 n x^3 \]

[Out]

-(b*d^2*n*x) - (b*d*e*n*x^2)/2 - (b*e^2*n*x^3)/9 - (b*d^3*n*Log[x])/(3*e) + ((d + e*x)^3*(a + b*Log[c*x^n]))/(
3*e)

________________________________________________________________________________________

Rubi [A]  time = 0.037794, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {32, 2313, 12, 43} \[ \frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-\frac{b d^3 n \log (x)}{3 e}-b d^2 n x-\frac{1}{2} b d e n x^2-\frac{1}{9} b e^2 n x^3 \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*(a + b*Log[c*x^n]),x]

[Out]

-(b*d^2*n*x) - (b*d*e*n*x^2)/2 - (b*e^2*n*x^3)/9 - (b*d^3*n*Log[x])/(3*e) + ((d + e*x)^3*(a + b*Log[c*x^n]))/(
3*e)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2313

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d +
 e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a,
b, c, d, e, n, r}, x] && IGtQ[q, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (d+e x)^2 \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-(b n) \int \frac{(d+e x)^3}{3 e x} \, dx\\ &=\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-\frac{(b n) \int \frac{(d+e x)^3}{x} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-\frac{(b n) \int \left (3 d^2 e+\frac{d^3}{x}+3 d e^2 x+e^3 x^2\right ) \, dx}{3 e}\\ &=-b d^2 n x-\frac{1}{2} b d e n x^2-\frac{1}{9} b e^2 n x^3-\frac{b d^3 n \log (x)}{3 e}+\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}\\ \end{align*}

Mathematica [A]  time = 0.0387098, size = 77, normalized size = 1.1 \[ \frac{1}{18} x \left (6 a \left (3 d^2+3 d e x+e^2 x^2\right )+6 b \left (3 d^2+3 d e x+e^2 x^2\right ) \log \left (c x^n\right )-b n \left (18 d^2+9 d e x+2 e^2 x^2\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*(a + b*Log[c*x^n]),x]

[Out]

(x*(6*a*(3*d^2 + 3*d*e*x + e^2*x^2) - b*n*(18*d^2 + 9*d*e*x + 2*e^2*x^2) + 6*b*(3*d^2 + 3*d*e*x + e^2*x^2)*Log
[c*x^n]))/18

________________________________________________________________________________________

Maple [C]  time = 0.218, size = 414, normalized size = 5.9 \begin{align*}{\frac{b \left ( ex+d \right ) ^{3}\ln \left ({x}^{n} \right ) }{3\,e}}-{\frac{i}{2}}e\pi \,bd{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+{\frac{i}{2}}e\pi \,bd{x}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+{\frac{i}{6}}{e}^{2}\pi \,b{x}^{3} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +{\frac{i}{2}}\pi \,b{d}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}x+{\frac{i}{2}}\pi \,b{d}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) x+{\frac{i}{2}}e\pi \,bd{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) -{\frac{i}{2}}\pi \,b{d}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}x+{\frac{i}{6}}{e}^{2}\pi \,b{x}^{3}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-{\frac{i}{2}}e\pi \,bd{x}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -{\frac{i}{6}}{e}^{2}\pi \,b{x}^{3} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-{\frac{i}{2}}\pi \,b{d}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) x-{\frac{i}{6}}{e}^{2}\pi \,b{x}^{3}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +{\frac{\ln \left ( c \right ) b{e}^{2}{x}^{3}}{3}}-{\frac{b{e}^{2}n{x}^{3}}{9}}+\ln \left ( c \right ) bde{x}^{2}+{\frac{a{e}^{2}{x}^{3}}{3}}-{\frac{bden{x}^{2}}{2}}-{\frac{b{d}^{3}n\ln \left ( x \right ) }{3\,e}}+\ln \left ( c \right ) b{d}^{2}x+ade{x}^{2}-b{d}^{2}nx+a{d}^{2}x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n)),x)

[Out]

1/3*b*(e*x+d)^3/e*ln(x^n)-1/2*I*e*Pi*b*d*x^2*csgn(I*c*x^n)^3+1/2*I*e*Pi*b*d*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2+1/
6*I*e^2*Pi*b*x^3*csgn(I*c*x^n)^2*csgn(I*c)+1/2*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2*x+1/2*I*Pi*b*d^2*csgn(I*
c*x^n)^2*csgn(I*c)*x+1/2*I*e*Pi*b*d*x^2*csgn(I*c*x^n)^2*csgn(I*c)-1/2*I*Pi*b*d^2*csgn(I*c*x^n)^3*x+1/6*I*e^2*P
i*b*x^3*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*e*Pi*b*d*x^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/6*I*e^2*Pi*b*x^3*
csgn(I*c*x^n)^3-1/2*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x-1/6*I*e^2*Pi*b*x^3*csgn(I*x^n)*csgn(I*c*x
^n)*csgn(I*c)+1/3*ln(c)*b*e^2*x^3-1/9*b*e^2*n*x^3+ln(c)*b*d*e*x^2+1/3*a*e^2*x^3-1/2*b*d*e*n*x^2-1/3*b*d^3*n*ln
(x)/e+ln(c)*b*d^2*x+a*d*e*x^2-b*d^2*n*x+a*d^2*x

________________________________________________________________________________________

Maxima [A]  time = 1.18355, size = 122, normalized size = 1.74 \begin{align*} -\frac{1}{9} \, b e^{2} n x^{3} + \frac{1}{3} \, b e^{2} x^{3} \log \left (c x^{n}\right ) - \frac{1}{2} \, b d e n x^{2} + \frac{1}{3} \, a e^{2} x^{3} + b d e x^{2} \log \left (c x^{n}\right ) - b d^{2} n x + a d e x^{2} + b d^{2} x \log \left (c x^{n}\right ) + a d^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/9*b*e^2*n*x^3 + 1/3*b*e^2*x^3*log(c*x^n) - 1/2*b*d*e*n*x^2 + 1/3*a*e^2*x^3 + b*d*e*x^2*log(c*x^n) - b*d^2*n
*x + a*d*e*x^2 + b*d^2*x*log(c*x^n) + a*d^2*x

________________________________________________________________________________________

Fricas [A]  time = 0.958527, size = 257, normalized size = 3.67 \begin{align*} -\frac{1}{9} \,{\left (b e^{2} n - 3 \, a e^{2}\right )} x^{3} - \frac{1}{2} \,{\left (b d e n - 2 \, a d e\right )} x^{2} -{\left (b d^{2} n - a d^{2}\right )} x + \frac{1}{3} \,{\left (b e^{2} x^{3} + 3 \, b d e x^{2} + 3 \, b d^{2} x\right )} \log \left (c\right ) + \frac{1}{3} \,{\left (b e^{2} n x^{3} + 3 \, b d e n x^{2} + 3 \, b d^{2} n x\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

-1/9*(b*e^2*n - 3*a*e^2)*x^3 - 1/2*(b*d*e*n - 2*a*d*e)*x^2 - (b*d^2*n - a*d^2)*x + 1/3*(b*e^2*x^3 + 3*b*d*e*x^
2 + 3*b*d^2*x)*log(c) + 1/3*(b*e^2*n*x^3 + 3*b*d*e*n*x^2 + 3*b*d^2*n*x)*log(x)

________________________________________________________________________________________

Sympy [B]  time = 1.90513, size = 133, normalized size = 1.9 \begin{align*} a d^{2} x + a d e x^{2} + \frac{a e^{2} x^{3}}{3} + b d^{2} n x \log{\left (x \right )} - b d^{2} n x + b d^{2} x \log{\left (c \right )} + b d e n x^{2} \log{\left (x \right )} - \frac{b d e n x^{2}}{2} + b d e x^{2} \log{\left (c \right )} + \frac{b e^{2} n x^{3} \log{\left (x \right )}}{3} - \frac{b e^{2} n x^{3}}{9} + \frac{b e^{2} x^{3} \log{\left (c \right )}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n)),x)

[Out]

a*d**2*x + a*d*e*x**2 + a*e**2*x**3/3 + b*d**2*n*x*log(x) - b*d**2*n*x + b*d**2*x*log(c) + b*d*e*n*x**2*log(x)
 - b*d*e*n*x**2/2 + b*d*e*x**2*log(c) + b*e**2*n*x**3*log(x)/3 - b*e**2*n*x**3/9 + b*e**2*x**3*log(c)/3

________________________________________________________________________________________

Giac [A]  time = 1.2323, size = 147, normalized size = 2.1 \begin{align*} \frac{1}{3} \, b n x^{3} e^{2} \log \left (x\right ) + b d n x^{2} e \log \left (x\right ) - \frac{1}{9} \, b n x^{3} e^{2} - \frac{1}{2} \, b d n x^{2} e + \frac{1}{3} \, b x^{3} e^{2} \log \left (c\right ) + b d x^{2} e \log \left (c\right ) + b d^{2} n x \log \left (x\right ) - b d^{2} n x + \frac{1}{3} \, a x^{3} e^{2} + a d x^{2} e + b d^{2} x \log \left (c\right ) + a d^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/3*b*n*x^3*e^2*log(x) + b*d*n*x^2*e*log(x) - 1/9*b*n*x^3*e^2 - 1/2*b*d*n*x^2*e + 1/3*b*x^3*e^2*log(c) + b*d*x
^2*e*log(c) + b*d^2*n*x*log(x) - b*d^2*n*x + 1/3*a*x^3*e^2 + a*d*x^2*e + b*d^2*x*log(c) + a*d^2*x